package main

import (
	"fmt"
	"unicode/utf8"
)

func main() {
	str := "miaomiaole世界"
	fmt.Println(len(str))

	for i, ch := range str {
		fmt.Printf("%d:%c \n", i, ch)
	}

	for index, value := range []byte(str) {
		fmt.Println("%d:%c \n", index, value)
	}

	for i, r := range []rune(str) {
		fmt.Printf("%d:%c \n", i, r)
	}
	println(utf8.RuneCountInString(str))
}
